<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <jsp:include page="../common/header.jsp" />
    <script type="text/javascript">
        function searchBtn() {
            var $searchBtn = $("input[name=searchBtn]");
            $searchBtn.bind("click", function () {
                $.ajax(
                        {
                            type: "get",
                            url: "teacherSearchTest.action",
                            data: {
                                teacherBianHao: $("input[name=teacherBianHao]").val()
                            },
                            dataType: "json",
                            success: login_Result,
                            error: function () {
                                alert("系统异常，请稍后重试！");
                            }
                        }
                );
                function login_Result(data) {
                    var d = eval("(" + data + ")");
                    if (d.flag == 0) {
                        alert("没有此教师编号对应的教师信息，请重新核对后输入！");
                        return;
                    }
                    else {
                        $("#myForm").submit();
                    }
                };
            });
        }

        $(function () {
            searchBtn();

        });
    </script>
</head>
<body>
<div class="lyear-layout-web">
    <div class="lyear-layout-container">
        <!--左侧导航-->
        <aside class="lyear-layout-sidebar">
            <!-- logo -->
            <div id="logo" class="sidebar-header">
                <jsp:include page="../common/title.jsp" />
            </div>
            <div class="lyear-layout-sidebar-scroll">
                <jsp:include page="../common/menu.jsp" />
            </div>
        </aside>
        <!--End 左侧导航-->
        <jsp:include page="../common/top.jsp" />
        <!--页面主要内容-->
        <main class="lyear-layout-content">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-lg-12">
                        <div class="card">
                            <div class="card-toolbar clearfix">
                                <h5>教师管理&nbsp;&gt;&nbsp;教师信息查询</h5>
                            </div>
                            <div class="card-body">
                                <div id="accordion">
                                    <div align="center">
                                        <form action="teacherSearchSuc.action" method="get" id="myForm">
                                            <strong>请输入完整的<span style="color:red">教师编号</span>：</strong><input type="text" name="teacherBianHao"/>&nbsp;&nbsp;&nbsp;<input
                                                type="button" name="searchBtn" value="查询"/>
                                        </form>
                                        <hr>
                                        <img alt="" src="image/teacherInfoSearch.jpg" width="1000" height="500"/>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>

            </div>

        </main>
        <!--End 页面主要内容-->
    </div>
</div>
</body>
</html>
